package com.ck.core.context;

import com.ck.common.SessionUser;

/**
 * 用户上下文
 */
public class UserContextHolder {
	
	public static final ThreadLocal<SessionUser> context = new ThreadLocal<>();
	
	public static SessionUser currentUser() {
		return context.get();
	}

	public static void set(SessionUser user) {
		context.set(user);
	}

	public static void shutdown() {
		context.remove();
	}
	
}
